package cn.ad.server.domain.enumration;

import cn.ad.server.domain.EnumMap;

import java.util.HashMap;
import java.util.Map;

/**
 * @author dongbin.yu
 * @from 2016-05-20
 * @since V1.0
 */
public enum AdFormat implements EnumMap {

	UNKOWN(0,"未知"),
    BANNER(1,"横幅"),
    TABLE_SCREEN(2,"插屏"),
    OPEN_SCREEN(3,"开屏"),
    VIDEO(4,"视频"),
    AD_NATIVE(5,"原生");

    private int value;

    private String name;

    public final static Map<Integer, AdFormat> adFormatMap = new HashMap<>();
    
    static {
        for (AdFormat adFormat : values()) {
            adFormatMap.put(adFormat.getValue(), adFormat);
        }
    }

    AdFormat(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }
}
